/*
 *  $Id: OceanSouls.cs 1051 2010-05-18 22:10:41Z thenn.erannor $
 *	This file is a part of Ragima CCG.
 *	(C) 2008 Ragima development group.
 *
 *	Licensed under the terms of the GNU GPL License version 2.
 *
 */

using System.Collections.Generic;

namespace Ragima.Cards001.Water.Spells {
    public class OceanSouls: SpellCard {
        public OceanSouls(): base("001_w_s_ocean_souls") {
            Level = CompleteLevel.Final;
            Element = ElementType.Water;
            Value = 100;
            AddManaCost(ElementType.Water, 5);
        }

        public override void DoAction(TargetArgs args) {
            List<GraveyardItem> items = args.Player.Graveyard.GetItemsWithoutAntimagic(0);
            int mana = 0;
            foreach (GraveyardItem item in items)
                if (item.Card.Element == ElementType.Water)
                    mana++;
            args.Player.IncrementMana(ElementType.Water, mana);
            args.Player.Graveyard.MoveTo(items, args.Player.SecondDeck);
        }
    }
}
